package com.task.repository;

import com.task.entity.ParentTask;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface IParentTaskRepository extends JpaRepository<ParentTask, Long>, JpaSpecificationExecutor<ParentTask>
{
    @Query(value = "select max(code) from tufa_parent_task where code like %?1% limit 1",nativeQuery = true)
    String findMaxCodeByCode(String code);
}
